Nagios : Add Monitoring Target Host#3 (Windows)
2016/06/08 |
It's possible to monitor Windows servers on the network.
For example, add Windows Server 2012 R2 for monitoring target.
|
|
[1] |
Download "NSClient++" and upload it on target Windows server.
⇒ http://sourceforge.net/projects/nscplus/ |
[2] | Install "NSClient++". Input Nagios server's hostname or IP address and set any password during installation like follows. The password is used for the connection from Nagios server to Windows server for monitoring. |
After installing, NSClient++ has been started. It's not need to change windows firewall settings because installer has done it. |
[3] | Configure Nagios server. |
root@dlp:~#
vi /etc/nagios-plugins/config/nt.cfg # change like follows: specify password for "password" which you set on Windows define command { command_name check_nt #command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -v '$ARG1$' command_line /usr/lib/nagios/plugins/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$ -s password }
root@dlp:~#
vi /etc/nagios3/conf.d/windows.cfg # create new # define target hosts define host{ use generic-host host_name fd3s alias fd3s address 10.0.0.100 } # for ping define service{ use generic-service host_name fd3s service_description PING check_command check_ping!100.0,20%!500.0,60% } # for NSClient++ version define service{ use generic-service host_name fd3s service_description NSClient++ Version check_command check_nt!CLIENTVERSION } # for uptime define service{ use generic-service host_name fd3s service_description Uptime check_command check_nt!UPTIME } # for CPU load define service{ use generic-service host_name fd3s service_description CPU Load check_command check_nt!CPULOAD!-l 5,80,90 } # for memory usage define service{ use generic-service host_name fd3s service_description Memory Usage check_command check_nt!MEMUSE!-w 80 -c 90 } # for disk space define service{ use generic-service host_name fd3s service_description C:\ Drive Space check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90 } # for explorer define service{ use generic-service host_name fd3s service_description Explorer check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe } # IIS define service{ use generic-service host_name winserver service_description W3SVC check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC } systemctl restart nagios3 |
[4] | It's possible to view the status for a new server on the admin site. |